/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.yourtrade.service.user;

import com.mycompany.yourtrade.model.Area;
import com.mycompany.yourtrade.model.City;
import com.mycompany.yourtrade.model.Commodity;
import com.mycompany.yourtrade.model.Cooperation;
import com.mycompany.yourtrade.model.Province;
import com.mycompany.yourtrade.model.Shop;
import com.mycompany.yourtrade.model.Streets;
import com.mycompany.yourtrade.model.UserAddress;
import com.mycompany.yourtrade.model.UserBean;
import com.mycompany.yourtrade.model.UserStore;
import java.util.List;
import org.apache.ibatis.annotations.Param;



public interface UserService {
    
    /**
     * 添加用户
     * @param userBean
     * @return 
     */
    public Integer addUserBean(@Param("id")String id,@Param("mobile")String mobile,@Param("password")String password,@Param("growth")String growth,@Param("sex")int sex,@Param("enable")int enable);
    /**
     * 根据用户手机号获取用户信息---用于登录
     * @param mobile
     * @return 
     */
    public UserBean getUserBeanByMobile(@Param("mobile")String mobile);
    
    /**
     * 获取省list
     */
    public List<Province> getProvince();
    /**
     * 获取市list
     */
    public List<City> getCity(@Param("pid")String pid);
    /**
     * 获取城市拼音
     * @return 
     */
    public List<City> getCityCapital();
    /**
     * 获取地区list
     */
    public List<Area> getArea(@Param("cid")String cid);
    /**
     * 获取街道list
     * @return 
     */
    public List<Streets> getStreetByArea(@Param("areaid")String areaid);
    /**
     * 根据城市获取热门商圈
     * @param cityid
     * @return 
     */
    public List<Streets> getHotStreetByCity(@Param("cityid")String cityid);
    /**
     * 获取用户详情--userId
     * @param userBean
     * @return 
     */
    public UserBean getUserBeanById(@Param("id")String id);
    /**
     * 根据用户ID 更改用户资料
     * @param userBean
     * @return 
     */
    public Integer updateUserInfo(UserBean userBean);
    /**
     * 根据ID获取地址详细信息
     * @param id
     * @return 
     */
    public UserAddress getAddressById(@Param("id")String id);
    /**
     * 根据UserId获取地址list
     * @param userId
     * @return 
     */
    public List<UserAddress> getAddressListByUserId(@Param("userId")String userId);
    /**
     * 获取用户有效地址数目
     * @param userId
     * @return 
     */
    public Integer getAddressNumberByUserId(@Param("userId")String userId);
    /**
     * 根据UserId添加地址
     * @param userAddress
     * @return 
     */
    public Integer addAddressByUserId(UserAddress userAddress);
    /**
     * 根据Id更改地址
     * @param userAddress
     * @return 
     */
    public Integer updateAddressInfoById(UserAddress userAddress);
    /**
     * 将USERID下面所有的地址状态改为非默认
     * @param userId
     * @return 
     */
    public Integer updateAllAddressStateByUserId(@Param("userId")String userId);
    /**
     * 根据ID更改地址状态
     * @param id
     * @return 
     */
    public Integer updateAddressStateById(@Param("id")String id,@Param("isDefault")int isDefault);
    /**
     * 根据ID删除地址
     * @param id
     * @return 
     */
    public Integer deleteAddressById(@Param("id")String id);
    /**
     * 获取今日推荐，推荐商品前8条，按照时间降序排列
     * @return 
     */
    public List<Commodity> getRecommendList();
    /**
     * 添加用户收藏
     * @param userStore
     * @return 
     */
    public Integer addUserStore(UserStore userStore);
    /**
     * 取消收藏
     * @param id
     * @return 
     */
    public Integer deleteStoreById(@Param("userId")String userId,@Param("storeArry") String[] storeArry);
    /**
     * 获取个人收藏的商品
     * @param userId
     * @return 
     */
    public List<Commodity> getColComById(@Param("userId")String userId);
    /**
     * 获取个人收藏的店铺
     * @param userId
     * @return 
     */
    public List<Shop> getColShopById(@Param("userId")String userId);
    /**
     * 商务合作添加
     * @param cooperation
     * @return 
     */
    public int addUserCooperation(Cooperation cooperation);
    /**
     * 商务合作根据电话号码查询个数
     * @param mobile
     * @return 
     */
    public Integer getCountByMobile(@Param("mobile")String mobile);
}
